const app = getApp()
Page({
    data: {
        config: app.config,

        imgUrl:'',
        
        shopName: '',
        name: '',
        phone: ''
    },
    onLoad() {

      my.setNavigationBar({
        reset: true
      });

    },


    affirm(){

      if(!this.data.phone){
        my.showToast({
          content: '请输入手机号，方便我们与您联系'
        })
        return;
      }

      let dat = {
        tit: this.data.shopName,
        name: this.data.name,
        phone: this.data.phone,
      }
      my.showLoading({
        content: '加载中...',
      });
      app.other.applyBusiness(dat)
      .then(res=>{
        console.log(666,res);
        if(res.code == 200){
          my.showToast({
            content: res.msg
          });
        }
        my.hideLoading();
      })
      .catch(err=>{
        my.hideLoading();
      })
    },

    cancel(){
      my.navigateBack({
        delta: 1
      });
    },


    bindInputA(e){
      this.setData({
        shopName: e.detail.value
      })
    },
    bindInputB(e){
      this.setData({
        name: e.detail.value
      })
    },
    bindInputC(e){
      this.setData({
        phone: e.detail.value
      })
    },









  



});
